package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.VisualSettings;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/VisualSettingsMapper.class */
public interface VisualSettingsMapper {
    @Results(id = "map", value = {@Result(property = "startTime", column = "start_time"), @Result(property = "endTime", column = "end_time")})
    @Select({"select *  from  visual_settings where id = #{id}"})
    VisualSettings queryById(Integer num);

    @ResultMap({"map"})
    @Select({"select * from  visual_settings where type = #{type}"})
    VisualSettings queryByType(String str);

    @Select({"<script>select *  from visual_settings <where> <if test='type != null and type.length &gt; 0'>type=#{type} </if><if test='classification != null and classification.length &gt; 0'>classification=#{classification} </if></where> </script>"})
    @ResultMap({"map"})
    List<VisualSettings> queryAll(VisualSettings visualSettings);

    @Insert({"insert into visual_settings(type,classification,start_time,end_time)values(#{type},#{classification},#{startTime},#{endTime})"})
    int insert(VisualSettings visualSettings);

    @Update({"<script>update visual_settings <set><if test='type != null and type.length &gt; 0'> type= #{type},</if><if test='classification != null and classification.length &gt; 0'> classification= #{classification},</if><if test='startTime != null and startTime.length &gt; 0'> start_time= #{startTime},</if><if test='endTime != null and endTime.length &gt; 0'> end_time= #{endTime},</if></set>where id = #{id}</script>"})
    int update(VisualSettings visualSettings);

    @Delete({"delete from visual_settings where id = #{id}"})
    int deleteById(Integer num);
}